{extend name="common:base" /}

{block name="main"}
<!--body wrapper start-->
<div class="wrapper">
    <div class="row">
        <div class="col-md-12">
            <!--breadcrumbs start -->
            <ul class="breadcrumb panel">
                <li><a href="{:url('Index/index')}"><i class="fa fa-home"></i> 控制台</a></li>
                <li><a href="{:url('index')}">设置中心</a></li>
                <li class="active">删除管理</li>
            </ul>
            <!--breadcrumbs end -->
        </div>
    </div>
    <div class="row">
        <div class="col-sm-12">
            <section class="panel">
                <div class="panel-body">
                    <span style="color: green">温馨提示:删除后数据将不能找回，请谨慎使用</span>
                    <form class="ids" action="" method="post">
                        <table class="table">
                            <thead>
                            <tr>
                                <th>表名</th>
                                <th>删除到最近第几天数据</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr>
                                <td>用户表</td>
                                <td><input type="text" id="1" value=""></td>
                                <td>
                                    <a href="#" class="fa fa-times confirm " onclick="do_del(1)" title="删除"></a>
                                </td>
                            </tr>
                            <tr>
                                <td>登陆日志表</td>
                                <td><input type="text" id="2" value=""></td>
                                <td>
                                    <a href="#" class="fa fa-times confirm " onclick="do_del(2)" title="删除"></a>
                                </td>
                            </tr>
                            <tr>
                                <td>操作日志表</td>
                                <td><input type="text" id="3" value=""></td>
                                <td>
                                    <a href="#" class="fa fa-times confirm " onclick="do_del(3)" title="删除"></a>
                                </td>
                            </tr>
                            <tr>
                                <td>开奖历史表</td>
                                <td><input type="text" id="4" value=""></td>
                                <td>
                                    <a href="#" class="fa fa-times confirm " onclick="do_del(4)" title="删除"></a>
                                </td>
                            </tr>
                            <tr>
                                <td>充值表</td>
                                <td><input type="text" id="5" value=""></td>
                                <td>
                                    <a href="#" class="fa fa-times confirm " onclick="do_del(5)" title="删除"></a>
                                </td>
                            </tr>
                            <tr>
                                <td>提现表</td>
                                <td><input type="text" id="6" value=""></td>
                                <td>
                                    <a href="#" class="fa fa-times confirm " onclick="do_del(6)" title="删除"></a>
                                </td>
                            </tr>
                            <tr>
                                <td>投注记录表</td>
                                <td><input type="text" id="7" value=""></td>
                                <td>
                                    <a href="#" class="fa fa-times confirm " onclick="do_del(7)" title="删除"></a>
                                </td>
                            </tr>

                            </tbody>
                        </table>
                    </form>

                </div>
            </section>
        </div>
    </div>
</div>
<script type="text/javascript">

    function do_del(type) {
        var day = document.getElementById(type).value;

        $.ajax({
            type: "post",
            url: "{:url('do_delete')}",
            data: {'id':type,'day':day},
            dataType: "json",
            async: false,
            success: function(data) {
                var info = data.msg;
                alert(info);
                location.reload();
            }
        });

    }
</script>
<!--body wrapper end-->
{/block}
